import React,{useState} from 'react'
import {View,Text,Image,ScrollView} from '@tarojs/components'

//导航
import DiscountNav from './discountnav'
import DiscountList from './discountlist'
import './index.scss'

export default function DiscountPage(){
  const [navList,useNavList] = useState([
    {text:'牛奶', id: 1},
    {text:'日用品', id: 1},
    {text:'洗漱用品', id: 1},
    {text:'饮料', id: 1},
  ])
  const [discountList,useDiscountList] = useState([
    {text:'商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称商品名称商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称商品名称商品名称商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
    {text:'商品名称',Image: require('../../../static/images/fushi.png'),
      newPrice: '￥888',oldPrice:'￥666', tag:'折扣', },
  ])
  return (
    <View className='discount_page'>
      <View className='discount_banner'>
        <Image src={require('../../../static/images/banner2.png')} />
      </View>
      {/*导航栏*/}
      <DiscountNav navList={navList} />
      {/*详情*/}
      <ScrollView scrollY enableFlex className='discount_list'>
        <DiscountList discountList={discountList} />
      </ScrollView>
    </View>
  )
}
